//
// Created by YueChuan on 2023/3/13.
//

#ifndef NETWORKDISK_TALKTABWIDGET_H
#define NETWORKDISK_TALKTABWIDGET_H

#include <QWidget>
#include <QDragMoveEvent>
#include <QMimeData>
#include <QDebug>
#include <QFileInfo>
#include <QFileIconProvider>
#include <QDateTime>
#include <QMap>
#include "connectSocket.h"

QT_BEGIN_NAMESPACE
namespace Ui { class talkTabWidget; }
QT_END_NAMESPACE

class talkTabWidget : public QWidget {
Q_OBJECT

public:
    explicit talkTabWidget(QWidget *parent = nullptr);

    ~talkTabWidget() override;

    void setSendUid(QString);

    void setAcceptUid(QString);

    void setSendName(QString);

    void setAcceptName(QString);

    void clearBrowser();

    void showHistory();

    void setSocket(connectSocket*);

public slots:

    void sendLabelCLicked_slot();

protected:
    void dragEnterEvent(QDragEnterEvent *event);

    void dragLeaveEvent(QDragLeaveEvent *event);

    void dropEvent(QDropEvent *event);

    void mouseReleaseEvent(QMouseEvent *event);


private:
    Ui::talkTabWidget *ui;
    QString sendUid;
    QString acceptUid;
    QString sendName;
    QString acceptName;
    connectSocket * socket;
    QMap<QString, QString> info;
};

#endif //NETWORKDISK_TALKTABWIDGET_H
